Skip Headers

Oracle® Objects for OLE C++ Class Library Developer's Guide 10g Release 2 (10.2) Part Number B14308-01 |
Home | Book List | Contents | Index | Master Index | Feedback

# SetSnapshot Method

Applies To

ODynaset

Description

Sets the SnapshotID. Read and write at runtime.

Usage

void SetSnapshot(OSnapshotID* snapID) throw(OException)

Arguments

snapID | SnapShotID value.

Remarks

The SnapshotID represents the snapshot from which this dynaset was created. It can be thought of as a timestamp. It can be passed into the ODynaset Open or constructor method call to cause it to be created using data from the same point in time as the original dynaset.

The SnapshotID property may be set with the value of another SnapshotID. That new snapshot will be used during the next Refresh when the query is re-executed. The Snapshot property always returns the SnapshotID on which this OraDynaset Object was based, not any other SnapshotID set through the snapshot property.

The SnapshotID will become invalid after a certain amount of time that is dependent on the amount of activity and the configuration of the database. When this happens you will get a "Snapshot too old" error message. For more information on snapshots, see the Oracle Database Concepts guide.

This SnapshotID represents the point in time when this dynaset was created. Changes to this dynaset (Edits, Deletes, AddNews) will not be reflected in additional dynasets created using this SnapshotID because they occurred after that point in time.

SnapshotID's are only meaningful for SELECT statements where the tables referenced are real database tables, as opposed to pseudo tables like DUAL.

See Also

GetSnapshot